package org.example.feign;

import io.swagger.annotations.ApiParam;
import org.example.request.LockProductRequest;
import org.example.util.JsonData;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

@FeignClient(name = "xdclass-product-service")
public interface ProductFeignService {

    /**
     * 根据product_ids批量查询订单
     */
    @PostMapping("/api/cart/v1/confirm_order_item")
    JsonData confirmOrderItem(@RequestBody List<Long> productIds);

    /**
     * 锁定商品库存
     */
    @PostMapping("/api/product/v1/lock_products")
    JsonData lockProducts(@RequestBody LockProductRequest lockProductRequest);

}
